#include "S_14_AirFresh_doChange.h"
#include "property_decoder.h"
#include "spec.h"

void P_14_1_AirFreshSwitch_doChange(bool newValue)
{
	property_value_t thiz;
    memset(&thiz,0,sizeof(thiz));
#if 	PROPERTY_TYPE
	property_value_new_boolean(&thiz,newValue);
#else	
    thiz.format = PROPERTY_FORMAT_BOOLEAN;
    thiz.data.boolean.value = newValue;
#endif		
	
    if (send_property_changed(14, 1, &thiz) != MIIO_OK)
    {
        LOG_INFO("%s:send_property_changed failed!\n",__func__);
    }
}

void P_14_5_AirWindFanLevel_doChange(int newValue)
{
	property_value_t thiz;
    memset(&thiz,0,sizeof(thiz));
#if 	PROPERTY_TYPE
	property_value_new_integer(&thiz,newValue);
#else	
    thiz.format = PROPERTY_FORMAT_NUMBER;
	thiz.data.number.type = DATA_NUMBER_INTEGER;
	thiz.data.number.value.integerValue = newValue;
#endif		
	
	if (send_property_changed(14, 5, &thiz) != MIIO_OK)
    {
        LOG_INFO("%s:send_property_changed failed!\n",__func__);
    }
}


void P_14_8_WindType_doChange(int newValue)
{
	property_value_t thiz;
    memset(&thiz,0,sizeof(thiz));
#if 	PROPERTY_TYPE
	property_value_new_integer(&thiz,newValue);
#else	
    thiz.format = PROPERTY_FORMAT_NUMBER;
	thiz.data.number.type = DATA_NUMBER_INTEGER;
	thiz.data.number.value.integerValue = newValue;
#endif		
	
	if (send_property_changed(14, 8, &thiz) != MIIO_OK)
    {
        LOG_INFO("%s:send_property_changed failed!\n",__func__);
    }
}

void P_14_9_FreshAirmMode_doChange(int newValue)
{
	property_value_t thiz;
    memset(&thiz,0,sizeof(thiz));
#if 	PROPERTY_TYPE
	property_value_new_integer(&thiz,newValue);
#else	
    thiz.format = PROPERTY_FORMAT_NUMBER;
	thiz.data.number.type = DATA_NUMBER_INTEGER;
	thiz.data.number.value.integerValue = newValue;
#endif		
	
	if (send_property_changed(14, 9, &thiz) != MIIO_OK)
    {
        LOG_INFO("%s:send_property_changed failed!\n",__func__);
    }
}






